package com.peakmain.wanandroid.netmodule.base;

import com.trello.rxlifecycle2.LifecycleTransformer;

/**
 * author: peakmain
 * createdata：2019/7/10
 * mail: 2726449200@qq.com
 * desiption:基本的协议类
 */
public interface BaseContract {
    public interface BasePresenter<T extends BaseContract.BaseView> {
        //绑定view和解绑view
        void attachView(T view);

        void detachView();

    }

    public interface BaseView {
        //显示loading
        void showLoading();
         //隐藏loading
        void hideLoading();

        void showSuccess(String message);

        void showFaild(String message);

        //显示当前网络不可用
        void showNoNet();

        //重试
        void onRetry();


        //绑定生命周期
        <T> LifecycleTransformer<T> bindToLife();
    }
}
